home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)aaw.d64
/
trader
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
13KB
|
373 lines
0 REM FROM THE H.P. SOFTWARE LIBRARY -- MODIFIED FOR THE COMMODORE BY R.J.HALL
1 POKE53280,2:POKE53281,7:PRINT"[147][145][145]":PRINTTAB(15);"TRADER[146]"
10 DIMS(12,25),T(12,12),B(3,12),M(6,3),C(6,3),P(6),Q(6),G(6)
20 R9=2/7:N2=1:S1=1:T1=1:L1=1
30 READK9,D9,Q,W,X9,G9,D1,Y1,H7
40 DATA3,15,.1,30,36,1.25,1,2070,1
50 C$="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"
60 S$="SOL YORKBOYDIVANREEFHOOKSTANTASKSINKSANDQUINGAOLKIRKKRISFATE"
70 S$=S$+"COKENOVAFASTCHARTIMEBETAVEGATICKTOCKFAIR"
80 FORNICATE=1TO6:READQ(NICATE):NEXT
90 DATA5000,3500,4000,4500,3000,3000
100 FORNICATE=1TO6:FORKL=1TO3:READM(NICATE,KL):NEXTKL,NICATE
110 FORNICATE=1TO6:FORKL=1TO3:READC(NICATE,KL):NEXTKL,NICATE
120 N$=" UR MET HE MED SOFT GEMS"
130 DEFFNZ(X)=(FNY(X)*.5+(1-FNY(X))*X/(2*ABS(S(I1,S1))))/K1
140 DEFFNY(X)=ABS(X>=ABS(S(I1,S1)))
150 PRINT:PRINT:PRINT:INPUT"HAVE ALL PLAYERS PLAYED BEFORE";A$:PRINT:IFLEFT$(A$,1)="N"THEN360
160 INPUT"IS THIS A RESTART";A$:IFLEFT$(A$,1)="Y"THEN450
170 INPUT"DO YOU WANT TO SET UP YOUR OWN GAME";A$:IFLEFT$(A$,1)="Y"THEN540
360 INPUT"HOW MANY PLAYERS";P9:ONP9GOTO410,410,410,410
370 PRINT"1-4 CAN PLAY":GOTO360
410 T9=2*P9:S9=3*P9+1:Y9=Y1+5:GOTO1000
450 INPUT"WHAT IS THE NAME OF YOUR FILE";A$
460 OPEN6,8,6,"0:"+A$+",S,R"
470 INPUT#6,W,D9,K9
471 INPUT#6,X9,D1,Y1
472 INPUT#6,P9,T9,S9
473 INPUT#6,Y9,T1,S1
474 INPUT#6,T$
480 FORNICATE=1TO12:FORKL=1TO25:INPUT#6,S(NICATE,KL):NEXTKL,NICATE
490 FORNICATE=1TO12:FORKL=1TO12:INPUT#6,T(NICATE,KL):NEXTKL,NICATE
500 FORNICATE=1TO3:FORKL=1TO12:INPUT#6,B(NICATE,KL):NEXTKL,NICATE
510 CLOSE6
523 M5=S1:GOTO1560
540 INPUT"HOW MANY PLAYERS";P9
550 PRINT:IFP9>=1ANDP9<=12THEN600
560 PRINT"1,2,3, ... ,12 CAN PLAY":GOTO540
600 INPUT"HOW MANY SHIPS PER PLAYER";X
610 PRINT:IFX<1THEN600
620 T9=P9*X:IFT9<=12THEN690
666 PRINT"I CAN'T KEEP TRACK OF MORE THAN 12 SHIPS";
670 PRINTP9"PLAYERS TIMES"X"SHIPS MAKES"T9
680 GOTO600
690 INPUT"HOW MANY STAR SYSTEMS";S9
700 PRINT:IFS9>0ANDS9<24THEN750
710 PRINT"FROM 4 TO 23":GOTO690
750 INPUT"ENTER LENGTH OF GAME IN YEARS";X
760 PRINT:IFX>=1ANDINT(X)=XTHEN810
770 PRINT"CHOOSE A POSITIVE INTEGER":GOTO750
810 Y9=Y1+X
820 INPUT"WHAT IS THE MAX CARGO TONNAGE";W
830 PRINT:IFW<25THEN820
860 INPUT"MINIMUM DISTANCE BETWEEN STARS";D9
870 IFD9<=25ANDD9>=10THEN910
880 PRINT"MIN SPACING 10, MAX 25":GOTO860
910 INPUT"HOW MANY BIDS OR OFFERS";K9
920 PRINT:IFK9<1THEN910
930 PRINT"SET THE PROFIT MARGIN(1,2,3,4,OR 5)"
935 PRINT"THE HIGHER THE NUMBER, THE LOWER THE PROFIT % ... USUALLY SET TO 2"
940 INPUT"...YOUR NUMBER";X9
942 IFABS(X9)>5THENX9=5
950 X9=18*ABS(X9)
1000 S(7,1)=15:H=1:FORS1=2TO3:GOSUB3760:NEXTS1:GOSUB1390
1005 IFS9<5THEN1030
1010 FORS1=5TOS9:ONS1-3*INT((S1-1)/3)GOSUB3760,1390,1430
1020 NEXTS1
1030 FORS1=1TOS9:GOSUB6050:S(9,S1)=270:S(10,S1)=Y1-1:NEXTS1:T1=1:L=1
1040 PRINT"[147]CAPTAINS, NAME YOUR SHIPS"
1050 PRINT" (UP TO 7 CHARACTERS)"
1060 FORI=1TOT9/P9:PRINT:FORP1=1TOP9:T(3,T1)=15:T(4,T1)=10:T(5,T1)=10:T(7,T1)=25
1070 T(9,T1)=D1:T(10,T1)=Y1:T(11,T1)=5000
1080 PRINT"CAPTAIN"P1"WHAT DO YOU NAME YOUR SHIP#"I
1090 INPUTA$:A$=A$+" ":T$=LEFT$(T$,L-1)+LEFT$(A$,7)+RIGHT$(T$,84-(L+6))
1100 T1=T1+1:L=L+7:NEXTP1,I
1110 FORB1=1TOP9:B(2,B1)=D1:B(3,B1)=Y1:NEXTB1:GOTO1700
1390 E=100:GOSUB1470:S(7,S1)=5:RETURN
1430 E=50:GOSUB1470:S(7,S1)=10:RETURN
1470 X=(RND(1)-.5)*E:Y=RND(1)*E/2:F=1:GOSUB3840:IFF=0THEN1470
1480 RETURN
1500 DATA-.1,.2,-.1,0,-.1,-.1,0,.1,.1,-.1,.1,0,.1,.2,.1,.1,-.1,0
1510 DATA1,1.5,.5,.75,.75,.75,-.75,-.75,-.75,-.5,-1.5,.5,-1,-1.5,-.5,.5,1.5,-.5
1560 GOSUB5370:GOSUB6270:H7=2
1590 FORT2=1TOT9:IFT2=T1THEN1660
1600 M=INT((T(9,T2)-1)/30):P=3*M+1:L=(T2-1)*7+1
1610 PRINTMID$(T$,L,7)" IS ENROUTE TO "MID$(S$,S(8,T(8,T2)),4)
1620 PRINT" ETA IS "MID$(C$,P,3)" "T(9,T2)-30*M;T(10,T2)
1660 NEXTT2:L=(T1-1)*7+1
1670 PRINTMID$(T$,L,7)" IS ABOUT TO LEAVE "MID$(S$,S(8,T(8,T1)),4)
1680 ONN2GOTO3420,4280
1700 GOSUB6270:GOSUB4750:N2=1:S1=1:T1=1:L1=1:Y1=2070
1790 FORI1=1TOT9/P9:FORP1=1TOP9
1800 PRINT"PLAYER"P1",TO WHICH STAR WILL "MID$(T$,L1,7)
1810 PRINT" TRAVEL";:GOSUB4020:L1=L1+7:T1=T1+1:NEXTP1,I1
1870 D=T(9,1):Y=T(10,1):T1=1:FORI=2TOT9:IFT(10,I)<YTHEN1950
1880 IFT(10,I)>YORT(9,I)>DTHEN1980
1885 IFT(9,I)>DTHEN1980
1890 IFT(9,I)=DANDRND(1)>.5THEN1980
1950 D=T(9,I):Y=T(10,I):T1=I
1980 NEXTI:IFY=Y1THEN2030
1990 D1=1:Y1=Y:GOSUB4750
2030 T2=T1:IFH7<>1THEN2150
2040 GOSUB6010
2050 PRINT"THE LAST YEAR OF THIS GAME IS"Y9
2060 PRINT"BUT IF YOU WANT TO QUIT BEFORE THEN, YOUCAN TYPE IN 'SAVE' AS YOUR NEXT"
2070 PRINT"PORT OF CALL - THIS WILL SAVE YOUR GAME IN A DISK FILE; THE PROGRAM WILL"
2080 PRINT"CREATE ONE FOR YOU. FOR A CURRENT PRICELIST TYPE IN 'REPORT', FOR THE"
2090 PRINT"STARMAP INPUT 'MAP', FOR CURRENT PRICES IN A CERTAIN STAR SYSTEM TYPE IN"
2100 PRINT"'LIBRARY', AND FOR A LIST OF THE SHIPS AND WHERE THEY ARE HEADING TYPE"
2110 PRINT"IN 'TRAVEL'.":H7=2
2120 INPUT"PRESS RETURN TO CONTINUE";CUNT$
2150 T1=T2:IFY1<Y9THEN2210
2160 GOSUB6010
2180 PRINT"GAME OVER - FINAL TOTALS":GOSUB5100:END
2210 D1=D:M=INT((D1-1)/30):L=3*M+1:PRINT"[206][214][205][214][206][214][205][214][206][214][205][214][206][214][205][214][206]"
2220 PRINT"[214] "MID$(C$,L,3);D1-30*M","Y1:L=(T1-1)*7+1:S1=T(8,T1):M5=S(8,S1)
2230 PRINT"[205] "MID$(T$,L,7)" HAS LANDED ON "MID$(S$,M5,4)
2240 ONT(12,T1)+1GOTO2360,2350,2330,2310
2310 PRINT"3 WEEKS LATE - PIRATES ATTACKED ENROUTE"
2311 IFRND(1)>.5THEN2315
2312 PRINT"(YOU LOST ALL BUT $5000 AND YOUR CARGO)":IFT(11,T1)>5000,T(11,T1)=5000
2313 GOTO2360
2315 PRINT"(YOU CAUGHT THEM & GOT A $5000 REWARD!)":T(11,T1)=T(11,T1)+5000
2316 GOTO2360
2330 PRINT"2 WEEKS LATE - ";:ONINT(3*RND(1))+1GOTO2331,2333,2335
2331 PRINT"WE GOT LOST SORRY":GOTO2360
2333 PRINT"HIJACKER BORROWED SHIP":GOTO2360
2335 PRINT"ENGINES BROKE DOWN":GOTO2360
2350 PRINT"1 WEEK LATE - ";:ONINT(3*RND(1))+1GOTO2351,2353,2355
2351 PRINT"OUR TRS-80 MADE A MISTAKE":GOTO2360
2353 PRINT"WE RAN OUT OF FUEL":GOTO2360
2355 PRINT"METEOR STORM MIDVOYAGE"
2360 PRINT:A$=MID$(S$,M5,4):Q2=2:S2=S1:GOTO4440
2410 GOSUB2430:GOTO2470
2430 PRINT"$$ "N$
2440 PRINT"[157]"T(11,T1);:PRINTTAB(8);
2450 FORNI=1TO6:PRINTT(NI,T1)" ";:NEXTNI
2460 RETURN
2470 GOSUB5370:PRINT:PRINT"WE ARE BUYING:":J1=1:FORI1=1TO6
2480 IFS(I1,S1)>=0ORT(I1,T1)<.5THEN2850
2490 PRINTMID$(N$,J1,6)" WE NEED";-INT(S(I1,S1))"UNITS."
2540 PRINTTAB(3)"HOW MANY ARE YOU SELLING";:GOSUB5910:IFX=0THEN2850
2550 IFX<=T(I1,T1)THEN2600
2560 PRINT"YOU ONLY HAVE"T(I1,T1)"UNITS IN YOUR HOLD":GOTO2540
2600 IFX<=2*-INT(S(I1,S1))THEN2630
2610 X=2*-INT(S(I1,S1)):PRINT"WE'LL BID ON"X"UNITS."
2630 FORK1=1TOK9:IFK1<>K9ORK1=1THEN2670
2640 PRINT"OUR FINAL OFFER:";:GOTO2690
2670 PRINT"WE OFFER";:Y2=(L1+1)*10/3
2690 PRINT100*INT(.009*P(I1)*X+.5):INPUT"WHAT DO YOU BID";Y
2700 IFY>P(I1)*X/10ANDY<P(I1)*X*10THEN2740
2710 PRINT"WATCH YOUR TYPING - TRY AGAIN":GOTO2670
2740 IFY<=P(I1)*XTHEN2800
2750 NIXIE=1+FNZ(X):TRICKIE=P(I1)*X:IFY>NIXIE*TRICKIETHEN2780
2760 P(I1)=.8*P(I1)+.2*Y/X
2770 NEXTK1
2780 PRINT"WE'LL PASS THIS ONE":GOTO2850
2800 PRINT"WE'LL BUY!":T(I1,T1)=T(I1,T1)-X:T(7,T1)=T(7,T1)+X*(I1<5)
2810 T(11,T1)=T(11,T1)+Y:S(I1,S1)=S(I1,S1)+X
2850 J1=J1+6:NEXTI1:PRINT:PRINT"WE ARE SELLING:":J1=1:FORI1=1TO6
2860 IFG(I1)<=0ORS(I1,S1)<1THEN3350
2870 IFI1<=4ANDT(7,T1)>=WTHEN3350
2880 PRINTTAB(5);MID$(N$,J1,6)" UP TO"INT(S(I1,S1))"UNITS."
2940 PRINT"HOW MANY ARE YOU BUYING";:GOSUB5910:IFX=0THEN3350
2950 IFI1>4ORX+T(7,T1)<=WTHEN3010
2960 PRINT"YOU HAVE"T(7,T1)"TONS ABOARD, SO"X"TONS"
2970 PRINT"PUT YOU OVER THE"W"TON LIMIT.":GOTO2940
3010 IFX<=S(I1,S1)THEN3040
3020 PRINT"WE ONLY HAVE"INT(S(I1,S1))"UNITS":GOTO2940
3040 FORK1=1TOK9:IFK1<>K9ORK1=1THEN3080
3050 PRINT"OUR FINAL OFFER:";:GOTO3090
3080 PRINT"WE WANT ABOUT";
3090 PRINT100*INT(.011*P(I1)*X+.5)
3095 INPUT"YOUR OFFER";Y
3100 IFY=0THEN3350
3110 IFY>P(I1)*X/10ANDY<P(I1)*X*10THEN3160
3125 PRINT"WATCH YOUR TYPING - TRY AGAIN":GOTO3080
3160 IFY>=P(I1)*XTHEN3220
3170 NANCIE=1-FNZ(X):REAGIE=P(I1)*X:IFY<NANCIE*REAGIETHEN3200
3180 P(I1)=.8*P(I1)+.2*Y/X:NEXTK1
3200 PRINT"THAT'S TOO LOW":GOTO3350
3220 IFY<=T(11,T1)THEN3300
3230 PRINT"YOU HAVE ONLY $"T(11,T1):GOSUB5800
3240 IFS(7,S1)<10ORT(11,T1)+B(1,B1)=0THEN3095
3250 GOSUB5510:GOTO3050
3290 IFY>T(11,T1)THEN3200
3300 PRINT"SOLD!":T(I1,T1)=T(I1,T1)+X:T(7,T1)=T(7,T1)-X*(I1<5)
3310 S(I1,S1)=S(I1,S1)-X:T(11,T1)=T(11,T1)-Y
3350 J1=J1+6:NEXTI1:GOSUB5800:IFS(7,S1)<10ORT(11,T1)+B(1,B1)=0THEN3420
3360 PRINT:GOSUB5510:PRINT
3420 PRINT"WHAT IS YOUR NEXT PORT OF CALL";:GOSUB4020:J=0:FORI=1TO6
3430 IFS(I,S1)>=0THEN3490
3440 IFS(I,S1)<G(I)THEN1870
3450 J=J+1
3490 NEXTI:IFJ>1THEN1870
3500 S(7,S1)=S(7,S1)+G9:G0=S(7,S1):IFG0<>5ANDG0<>10ANDG0<>15THEN3570
3510 GOSUB6020:GOSUB6010
3520 PRINT"STAR ";MID$(S$,M5,4);" IS NOW A CLASS"D$" SYSTEM"
3570 IFS9=26THEN1870
3580 J=0:FORI=1TOS9:J=J+S(7,I):NEXTI:IFJ/S9<10THEN1870
3590 S9=S9+1:S1=S9:GOSUB6050:GOSUB3760:S(9,S1)=D1:S(10,S1)=Y1:GOSUB6010
3600 PRINT"A NEW STAR SYSTEM HAS BEEN DISCOVERED! IT IS CLASS IV & ITS NAME IS ";
3610 PRINTMID$(S$,S(8,S1),4):GOSUB6270:GOTO1870
3760 X=(RND(1)-.5)*100:Y=50*RND(1):IFABS(X)<25ANDY<25THEN3760
3770 F=1:GOSUB3840:IFF=0THEN3760
3780 S(7,S1)=0:RETURN
3840 ONHGOTO3930,3900,3880,3850
3850 Z=X:X=-Y:GOTO3930
3880 Y=-Y:GOTO3930
3900 Z=X:X=Y:Y=Z
3930 FORJ=1TOS1-1:IFSQR((X-S(11,J))^2+(Y-S(12,J))^2)>=D9THEN3970
3940 F=0:RETURN
3970 NEXTJ:S(11,S1)=INT(X):S(12,S1)=INT(Y):H=1-(H<=3)*H:RETURN
4020 INPUTA$:A$=A$+" ":IFLEFT$(A$,3)="END"THEN2180
4030 FORI=1TOS9:J=S(8,I):IFLEFT$(A$,4)=MID$(S$,J,4)THEN4300
4040 NEXTI:IFLEFT$(A$,3)<>"MAP"THEN4130
4050 MUFU=L1:S2=S1:GOSUB6270
4110 L1=MUFU:S1=S2:GOTO4220
4130 IFLEFT$(A$,3)<>"REP"THEN4240
4140 SUCKY=-1:S2=S1:GOSUB6010:GOSUB4940:GOTO4110
4190 IFH7=1THEN4220
4200 IFLEFT$(A$,3)="SAV"THEN6140
4210 PRINTLEFT$(A$,4)" IS NOT A STAR IN THIS GAME"
4220 PRINT"NEXT STAR";:GOTO4020
4240 IFLEFT$(A$,3)<>"TRA"THEN4340
4250 N2=2:GOTO1590
4280 N2=1:GOTO4220
4300 T(8,T1)=I:IFI<>S1THEN4490
4310 PRINT"CHOOSE A DIFFERENT STAR SYSTEM TO VISIT":GOTO4220
4340 IFLEFT$(A$,3)<>"LIB"THEN4190
4350 Q0=1:Q2=1:INPUT"WHICH STAR";A$:A$=A$+" "
4360 FORN=1TOS9:IFLEFT$(A$,4)=MID$(S$,S(8,N),4)THEN4420
4370 NEXTN:GOTO4210
4420 S2=S1:S1=N
4440 PRINT"NAME"N$:FORS1=S1TOS1:GOTO4980
4460 S1=S2:PRINT:ONQ2GOTO4220,2410
4490 D2=INT(SQR((S(11,S1)-S(11,I))^2+(S(12,S1)-S(12,I))^2)/R9)
4500 IFRND(1)>Q/2THEN4610
4509 OB=INT(RND(1)*3)+1
4510 I=INT(RND(1)*3)+1:ONIGOTO4580,4560,4540
4540 ONOBGOTO4542,4544,4546
4542 PRINT"SHIP DOES NOT PASS INSPECTION":GOTO4590
4544 PRINT"REACTOR LEAK QUARANTINES LAUNCH PAD":GOTO4590
4546 PRINT"SHIP IS SABOTAGED":GOTO4590
4560 ONOBGOTO4562,4564,4566
4562 PRINT"CREWMEN DEMAND A VACATION":GOTO4590
4564 PRINT"FUEL COMPANY ON STRIKE":GOTO4590
4566 PRINT"TRS-80 REFUSES TO PLOT COURSE":GOTO4590
4580 ONOBGOTO4582,4584,4586
4582 PRINT"LOCAL HOLIDAY SOON":GOTO4590
4584 PRINT"CARGO DELIVERY TO SHIP COMES LATE":GOTO4590
4586 PRINT"CREW DIDN'T PAY UNION DUES"
4590 PRINT" --"I"WEEK DELAY.":D2=D2+7*I
4610 T(9,T1)=T(9,T1)+D2:IFT(9,T1)<=360THEN4650
4620 T(9,T1)=T(9,T1)-360:T(10,T1)=T(10,T1)+1
4650 M=INT((T(9,T1)-1)/30):L=3*M+1
4660 PRINT"ETA AT "MID$(S$,J,4)" IS "MID$(C$,L,3);T(9,T1)-30*M;T(10,T1)
4670 I=-(INT(RND(1)*3)+1)*(RND(1)<(Q/2)):T(9,T1)=T(9,T1)+7*I
4680 IFT(9,T1)<=360THEN4730
4690 T(9,T1)=T(9,T1)-360:T(10,T1)=T(10,T1)+1
4730 T(12,T1)=I:RETURN
4750 GOSUB6010:PRINT"JAN 1,"Y1,"YEARLY REPORT #"Y1-2069""
4760 IFH7<>1THEN4940
4770 PRINT"STAR SYSTEM CLASSES:[146]"
4780 PRINT"I COSMOPOLITAN"
4790 PRINT"II DEVELOPED"
4800 PRINT"III UNDERDEVELOPED"
4810 PRINT"[144]IV FRONTIER"
4820 PRINT"MERCHANDISE:[146]"
4830 PRINT"UR URANIUM"
4840 PRINT"MET METALS"
4850 PRINT"HE HEAVY EQUIPMENT"
4860 PRINT"MED MEDICINE"
4870 PRINT"SOFT COMPUTER SOFTWARE"
4880 PRINT"GEMS STAR GEMS"
4890 PRINT"EACH SHIP CAN CARRY <="W"TONS OF CARGO"
4900 PRINT"STAR GEMS & COMPUTER SOFTWARE, WHICH ARENOT SOLD BY THE TON, DON'T COUNT."
4910 INPUT"PRESS RETURN TO CONTINUE";FUCK$
4930 PRINT""
4940 PRINTTAB(13)"CURRENT PRICES[146]"
4950 PRINT"NAME"N$:Q2=0:FORS1=1TOS9
4980 GOSUB5370:FORI=1TO6:P(I)=SGN(S(I,S1))*P(I):NEXTI:GOSUB6020
4990 PRINTPE$MID$(S$,S(8,S1),4)NG$;:FORNICATE=1TO6:PRINTP(NICATE);:NEXTNICATE
5000 IFQ2<>0THEN4460
5080 NEXTS1:PRINT"(' ' MEANS SELLING & '-' MEANS BUYING)"
5090 INPUT"PRESS RETURN TO CONTINUE";OB$
5095 IFSUCKYTHENSUCKY=0:RETURN
5100 PRINT"";TAB(15)"CAPTAINS[146]"
5110 PRINT"# $ON SHIPS $IN BANK CARGOES TOTALS"
5120 FORB1=1TOP9:GOSUB5860:NEXTB1:FORP1=1TOP9:PRINT:M1=0:M2=0:FORI1=0TOT9/P9-1
5130 M1=M1+T(11,P9*I1+P1):FORK=1TO6:M2=M2+T(K,P9*I1+P1)*Q(K):NEXTK,I1
5140 M3=M2+M1+B(1,P1):PRINTP1;TAB(3)M1;TAB(13)B(1,P1);TAB(23)M2;TAB(32)M3
5150 NEXTP1:Q5=T1:INPUT"PRESS RETURN TO CONTINUE";OB$
5160 PRINT"";TAB(17)"SHIPS[146]":
5300 FORT1=1TOT9:PRINTMID$(T$,(T1-1)*7+1,7):GOSUB2430:NEXTT1:T1=Q5
5310 INPUT"PRESS RETURN TO CONTINUE";VIC$:RETURN
5370 R1=1-(S(7,S1)>=5)-(S(7,S1)>=10):D2=12*(Y1-S(10,S1))+(D1-S(9,S1))/30
5380 FORI=1TO6:G(I)=(1+S(7,S1)/15)*(M(I,R1)*S(7,S1)+C(I,R1))
5390 IFABS(G(I))>.01THEN5440
5400 P(I)=0:GOTO5470
5440 PALE=ABS(G(I)*12):CHIUN=ABS(S(I,S1)+D2*G(I)):IFPALE<CHIUNTHENCHIUN=PALE
5442 S(I,S1)=SGN(G(I))*CHIUN
5450 PISS=ABS(S(I,S1)/(G(I)*X9)):P(I)=Q(I)*(1-SGN(S(I,S1))*PISS)
5460 P(I)=100*INT(P(I)/100+.5)
5470 NEXTI:S(9,S1)=D1:S(10,S1)=Y1:RETURN
5510 INPUT"DO YOU WISH TO VISIT THE LOCAL BANK";A$:IFLEFT$(A$,1)="Y"THEN5550
5520 RETURN
5550 GOSUB5800:GOSUB5860:PRINT"YOU HAVE $"B(1,B1)"IN THE BANK"
5560 PRINT"AND $"T(11,T1)"ON YOUR SHIP":IFB(1,B1)=0THEN5690
5600 INPUT"HOW MUCH DO YOU WISH TO WITHDRAW";Z:IFZ<=B(1,B1)THEN5650
5601 ONINT(RND(1)*3)+1GOTO5610,5605,5615
5605 PRINT" YOUR WISH NOT GRANTED, UNLESS YOU'RE A GOVERNMENT OFFICIAL!":GOTO5600
5610 PRINT"I KNOW I SAID 'WISH', BUT GET SERIOUS!":GOTO5600
5615 PRINT"BANK SAYS SURE, IF YOU'VE GOT SOME, UH, CERTAIN SUBSTANCES IN YOUR CARGO!"
5617 GOTO5600
5650 IFZ<=0THEN5690
5660 B(1,B1)=B(1,B1)-Z:T(11,T1)=T(11,T1)+Z:RETURN
5690 INPUT"HOW MUCH DO YOU WISH TO DEPOSIT";Z:IFZ>=0THEN5740
5700 PRINT"YOU MISSED YOUR CHANCE TO WITHDRAW,MEHUM":GOTO5690
5740 IFZ<=T(11,T1)THEN5770
5750 PRINT"YOU HAVE BUT $"T(11,T1)"ABOARD":GOTO5690
5770 T(11,T1)=T(11,T1)-Z:B(1,B1)=B(1,B1)+Z:RETURN
5800 B1=T1:FORI=1TOS9/P9:IFB1<=P9THEN5850
5810 B1=B1-P9:NEXTI
5850 RETURN
5860 B(1,B1)=B(1,B1)*(1+.05*(Y1-B(3,B1)+(D1-B(2,B1))/360))
5865 B(1,B1)=INT(B(1,B1))
5870 B(2,B1)=D1:B(3,B1)=Y1:RETURN
5900 PRINTTAB(5)"HOW MANY";
5910 INPUTX:IFX<>-1THEN5960
5920 GOSUB2430:GOTO5900
5960 IFINT(X)=XANDX>=0THEN6000
5970 PRINT"TYPE 0 IF YOU WANT TO PASS THIS ONE, OR -1 TO FIND OUT YOUR TOTALS"
5980 GOTO5900
6000 RETURN
6010 PRINT"":FORNICATE=1TO100:IFINT(NICATE/2)=NICATE/2THENPRINT"[145][146]";:GOTO6012
6011 PRINT"[145]";
6012 PRINTTAB(5)"***[144]GEN[154]E[156]RAL [129]A[149]N[150]N[151]O[152]UN[154]C[156]E[144]MENT***"
6013 NEXTNICATE:RETURN
6020 D$=" IV III II I":D$=MID$(D$,INT(S(7,S1)/5)*5+1,5)
6030 NG$="":WHUFFO$="[144]":PE$=MID$(WHUFFO$,INT(S(7,S1)/5)+1,1):RETURN
6050 IFS1>1THEN6080
6060 I=1:GOTO6120
6080 I=4*INT(RND(1)*24)+5:FORJ=2TOS1-1:IFI=S(8,J)THEN6080
6090 NEXTJ
6120 S(8,S1)=I:RETURN
6140 INPUT"WHAT IS THE NAME OF YOUR FILE";A$
6150 TKM$=CHR$(13)
6170 OPEN6,8,6,"@0:"+A$+",S,W"
6180 PRINT#6,STR$(W)","STR$(D9)","STR$(K9)TKM$;
6181 PRINT#6,STR$(X9)","STR$(D1)","STR$(Y1)TKM$;
6182 PRINT#6,STR$(P9)","STR$(T9)","STR$(S9)TKM$;
6183 PRINT#6,STR$(Y9)","STR$(T1)","STR$(S1)TKM$;
6184 PRINT#6,T$TKM$;
6190 FORNICATE=1TO12:FORKL=1TO25:PRINT#6,STR$(S(NICATE,KL))TKM$;:NEXTKL,NICATE
6200 FORNICATE=1TO12:FORKL=1TO12:PRINT#6,STR$(T(NICATE,KL))TKM$;:NEXTKL,NICATE
6210 FORNICATE=1TO3:FORKL=1TO12:PRINT#6,STR$(B(NICATE,KL))TKM$;:NEXTKL,NICATE
6220 CLOSE6
6230 END
6270 PRINT"";TAB(16)"STAR MAP[146]":PRINTTAB(14)"[218][218][218][218][218][218][218][218][218][218][218][218]"
6280 FORL1=10TO-10STEP-1:IFL1<>0THEN6300
6290 L$="[219][195][195][219][195][195][219][195][195][219][195][195][219][195][195]*SOL[195][195][219][195][195][219][195][195][219][195][195][219] ":GOTO6380
6300 IFL1/2=INT(L1/2)THENOB$="[219]":GOTO6330
6310 OB$="[194]"
6330 L$=" "+OB$+" "
6380 Y=L1*5:Y0=(L1+1)*5:FORS1=2TOS9:IFS(12,S1)>=Y0ORS(12,S1)<YTHEN6450
6390 X1=INT((LEN(L$)-4)/2+.5+S(11,S1)*((LEN(L$)-4)/2-.5)/50)
6395 GOSUB6020
6400 LI$=LEFT$(L$,X1-1)+PE$+"*"+MID$(S$,S(8,S1),4)+NG$
6410 LI$=LI$+RIGHT$(L$,LEN(L$)-(X1+4)):L$=LI$
6450 NEXTS1:PRINTL$:NEXTL1
6480 INPUT"PRESS RETURN TO CONTINUE";A$:RETURN
6666 REM A DCLXVI PRODUCTION - R.J.HALL